INCLUDE_DIRECTORIES(./
    )

#AUX_SOURCE_DIRECTORY(./include CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/imedb CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/imedb/slm CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/imedb/trie CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/chinese CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/chinese/pinyin CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/chinese/pinyin/candidatecontext CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/chinese/pinyin/convertor CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/chinese/stroke CLM_DIRS_SRC)
#AUX_SOURCE_DIRECTORY(./src/prediction/english CLM_DIRS_SRC)

SET(SRCS_TCP tcpclient.cpp tcpserver.cpp)

#IF(HAVE_PTHREAD_H)
#SET(SRCS_COMMON ${SRCS_COMMON} zthread.cpp)
#ENDIF(HAVE_PTHREAD_H)

#ADD_DEFINITIONS("-DHAVE_CONFIG_H")
#ADD_DEFINITIONS("-DTINY_SUN")


INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED
        libuv
        libssl
        libcrypto
        )

MESSAGE(STATUS "ALL common SOURCE FILES: ${SRCS_TCP}")
ADD_LIBRARY(tcp STATIC ${SRCS_TCP})
TARGET_LINK_LIBRARIES(tcp ${pkgs_LDFLAGS})